

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Blog - React</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta property="og:title" content="Blog - React">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://facebook.github.io/react/blog/page5/">
  <meta property="og:image" content="https://facebook.github.io/react/img/logo_og.png">
  <meta property="og:description" content="A JavaScript library for building user interfaces">
  <meta property="fb:app_id" content="623268441017527">

  <link rel="shortcut icon" href="/favicon.ico">
  <link rel="alternate" type="application/rss+xml" title="React" href="https://facebook.github.io/react/feed.xml">

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
  <link rel="stylesheet" href="/css/syntax.css">
  <link rel="stylesheet" href="/css/codemirror.css">
  <link rel="stylesheet" href="/css/react.css">

  <script src="//use.typekit.net/vqa1hcx.js"></script>
  <script>try{Typekit.load();}catch(e){}</script>

  <!--[if lte IE 8]>
  <script src="/js/html5shiv.min.js"></script>
  <script src="/js/es5-shim.min.js"></script>
  <script src="/js/es5-sham.min.js"></script>
  <![endif]-->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
  <script src="/js/codemirror.js"></script>
  <script src="/js/javascript.js"></script>
  <script src="/js/xml.js"></script>
  <script src="/js/jsx.js"></script>
  <script src="/js/react.js"></script>
  <script src="/js/react-dom.js"></script>
  <script src="/js/babel.min.js"></script>
  <script src="/js/live_editor.js"></script>
</head>
<body>

  <div class="container">

    <div class="nav-main">
  <div class="wrap">
    <a class="nav-home" href="/">
      <img class="nav-logo" src="/img/logo.svg" width="36" height="36">
      React
    </a>
    <div class="nav-lists">
      <ul class="nav-site nav-site-internal">
        <li><a href="/docs/hello-world.html">Docs</a></li>
        <li><a href="/tutorial/tutorial.html">Tutorial</a></li>
        <li><a href="/community/support.html">Community</a></li>
        <li><a href="/blog/" class="active">Blog</a></li>
        <li class="nav-site-search">
          <input id="algolia-doc-search" type="text" placeholder="Search docs..." />
        </li>
      </ul>
      <ul class="nav-site nav-site-external">
        <li><a href="https://github.com/facebook/react">GitHub</a></li>
        <li><a href="https://github.com/facebook/react/releases">v16.0.0-alpha.3</a></li>
      </ul>
    </div>
  </div>
</div>


    <section class="content wrap blogContent">
  <div class="nav-docs nav-blog">
  <div class="nav-docs-section">
    <h3>Recent posts</h3>
    <ul>
      
        <li><a href="/blog/2016/11/16/react-v15.4.0.html">React v15.4.0</a></li>
      
        <li><a href="/blog/2016/09/28/our-first-50000-stars.html">Our First 50,000 Stars</a></li>
      
        <li><a href="/blog/2016/08/05/relay-state-of-the-state.html">Relay: State of the State</a></li>
      
        <li><a href="/blog/2016/07/22/create-apps-with-no-configuration.html">Create Apps with No Configuration</a></li>
      
        <li><a href="/blog/2016/07/13/mixins-considered-harmful.html">Mixins Considered Harmful</a></li>
      
        <li><a href="/blog/2016/07/11/introducing-reacts-error-code-system.html">Introducing React's Error Code System</a></li>
      
        <li><a href="/blog/2016/04/08/react-v15.0.1.html">React v15.0.1</a></li>
      
        <li><a href="/blog/2016/04/07/react-v15.html">React v15.0</a></li>
      
        <li><a href="/blog/2016/03/29/react-v0.14.8.html">React v0.14.8</a></li>
      
        <li><a href="/blog/2016/03/16/react-v15-rc2.html">React v15.0 Release Candidate 2</a></li>
      
      <li><a href="/blog/all.html">All posts ...</a></li>
    </ul>
  </div>
</div>

  <div class="inner-content">
    
      <div class="post-list-item">
        

<h1>

  <a href="/blog/2015/10/28/react-v0.14.1.html">React v0.14.1</a>

</h1>

<p class="meta">
  October 28, 2015
  by
  
    
      <a href="https://twitter.com/zpao">Paul O’Shannessy</a>
    
    
  
</p>

<hr>

<div class="post">
  <p>After a couple weeks of having more people use v0.14, we&#39;re ready to ship a patch release addressing a few issues. Thanks to everybody who has reported issues and written patches!</p>

<p>The release is now available for download:</p>

<ul>
<li><strong>React</strong><br>
Dev build with warnings: <a href="https://fb.me/react-0.14.1.js">https://fb.me/react-0.14.1.js</a><br>
Minified build for production: <a href="https://fb.me/react-0.14.1.min.js">https://fb.me/react-0.14.1.min.js</a><br></li>
<li><strong>React with Add-Ons</strong><br>
Dev build with warnings: <a href="https://fb.me/react-with-addons-0.14.1.js">https://fb.me/react-with-addons-0.14.1.js</a><br>
Minified build for production: <a href="https://fb.me/react-with-addons-0.14.1.min.js">https://fb.me/react-with-addons-0.14.1.min.js</a><br></li>
<li><strong>React DOM</strong> (include React in the page before React DOM)<br>
Dev build with warnings: <a href="https://fb.me/react-dom-0.14.1.js">https://fb.me/react-dom-0.14.1.js</a><br>
Minified build for production: <a href="https://fb.me/react-dom-0.14.1.min.js">https://fb.me/react-dom-0.14.1.min.js</a><br></li>
</ul>

<p>We&#39;ve also published version <code>0.14.1</code> of the <code>react</code>, <code>react-dom</code>, and addons packages on npm and the <code>react</code> package on bower.</p>

<hr>

<h2>Changelog</h2>

<h3>React DOM</h3>

<ul>
<li>Fixed bug where events wouldn&#39;t fire in old browsers when using React in development mode</li>
<li>Fixed bug preventing use of <code>dangerouslySetInnerHTML</code> with Closure Compiler Advanced mode</li>
<li>Added support for <code>srcLang</code>, <code>default</code>, and <code>kind</code> attributes for <code>&lt;track&gt;</code> elements</li>
<li>Added support for <code>color</code> attribute</li>
<li>Ensured legacy <code>.props</code> access on DOM nodes is updated on re-renders</li>
</ul>

<h3>React TestUtils Add-on</h3>

<ul>
<li>Fixed <code>scryRenderedDOMComponentsWithClass</code> so it works with SVG</li>
</ul>

<h3>React CSSTransitionGroup Add-on</h3>

<ul>
<li>Fix bug preventing <code>0</code> to be used as a timeout value</li>
</ul>

<h3>React on Bower</h3>

<ul>
<li>Added <code>react-dom.js</code> to <code>main</code> to improve compatibility with tooling</li>
</ul>

</div>



      </div>
    
      <div class="post-list-item">
        

<h1>

  <a href="/blog/2015/10/19/reactiflux-is-moving-to-discord.html">Reactiflux is moving to Discord</a>

</h1>

<p class="meta">
  October 19, 2015
  by
  
    
      <a href="https://github.com/benigeri">Paul Benigeri</a>
    
    
  
</p>

<hr>

<div class="post">
  <p>TL;DR: Slack decided that Reactiflux had too many members and disabled new invites. Reactiflux is moving to Discord. Join us: <a href="http://join.reactiflux.com/">http://join.reactiflux.com</a></p>

<h2>What happened with Slack?</h2>

<p>A few weeks ago, Reactiflux reached 7,500 members on Slack. Shortly after, Slack decided we were too big and disabled invites. There was no way for new users to join. Many of us were sad and upset. We loved Slack.  Our community was built around it.</p>

<p>We reached out to Slack several times, but their decision was firm. Our large community caused performance issues. Slack wants to focus on building a great product for teams, not necessarily large open communities. Losing focus and building for too many use cases always leads to product bloat, and eventually a decrease in quality.</p>

<h2>So… why Discord?</h2>

<p>After a <a href="https://github.com/reactiflux/volunteers/issues/25">long and thorough debate</a>, Discord quickly emerged as the most promising service. After just a few days, 400 members had joined the Discord server, and many already loved it.</p>

<h3>Easiest to join</h3>

<p>Discord is the easiest platform to join. New users can immediately join our conversations without having to create an account. All they need to do is provide a name. No permission granting, no password, no email confirmation.</p>

<p>This is critically useful for us, and will make Reactiflux even more open and accessible.</p>

<h3>Great apps</h3>

<p>Out of all of the services we’ve tried, Discord’s apps are by far the most polished. They are well designed, easy to use, and surprisingly fast. In addition to the web app, they have mobile apps on both iOS and Android as well as desktop apps for OS X and Windows, with Linux support coming soon.</p>

<p>Their desktop apps are built with React and Electron, and their iOS app is built with React Native.</p>

<h3>Moderation tools</h3>

<p>So far, we’ve been fortunate not to have to deal with spammers and trolls. As our community continues to grow, that might change. Unsurprisingly, Discord is the only app we’ve seen with legitimate moderation tools. It was built for gaming communities, after all.</p>

<h3>Great multiple Server support</h3>

<p>Your  Discord account works with every Discord server, which is the equivalent of a Slack team. You don’t need to create a new account every time you join a new team. You can join new servers in one click, and it’s very easy to switch between them. Discord messages also work across servers, so your personal conversations are not scoped to a single server.</p>

<p>Instead of having one huge, crowded Reactiflux server, we can branch off closely related channels into sub-servers. Communities will start overlapping, and it will be easy to interact with non-Reactiflux channels.</p>

<h3>It’s hosted</h3>

<p>Self-hosted apps require maintenance. We’re all busy, and we can barely find the time to keep our landing page up to date and running smoothly. More than anything, we need a stable platform, and we don’t have the resources to guarantee that right now.</p>

<p>It’s a much safer bet to offload the hosting to Discord, who is already keeping the lights on for all their users.</p>

<h3>We like the team</h3>

<p>And they seem to like us back. They are excited for us to join them, and they’ve been very responsive to our feedback and suggestions.</p>

<p>They implemented code syntax highlighting just a few days after we told them we needed it.</p>

<p>Discord’s team has already built a solid suite of apps, and they have shown us how much they care about their users. We’re excited to see how they will continue to improve their product.</p>

<h2>And what’s the catch?</h2>

<p>Choosing the best chat service is subjective. There are a million reasons why Discord <em>might be</em> a terrible idea. Here are the ones that we’re most worried about:</p>

<h3>Difficult channel management</h3>

<p>Channel management seems to be the biggest issue. There is no way to opt out of channels; you can only mute them. And you can only mute channels one by one. There is no way to star channels, and channels can only be sorted on the server level. Each user will see the list of channels in the same order.</p>

<p>As the number of channels grow, it will be challenging to keep things in order. Branching off sub-servers will help, and we will keep an easily accessible directory of channels across our main server and all of the sub-servers.</p>

<p>We can build simple tools to make channel lookup easier, and the Discord team is working on improvements that should make this more manageable.</p>

<h3>No Search</h3>

<p>Lack of search is clearly a bummer, but Discord is working on it. Search is coming!</p>

<h3>Firewall</h3>

<p>A couple of users aren’t able to access Discord at work since other corporate filters classify it as a gaming application. This sucks, but it seems to be a  rare case. So far, it seems only to affect 0.6% of our current community (3/500).</p>

<p>We hope that these users can get Discord&#39;s domains whitelisted, and we’ll try to find a solution if this is a widespread issue. The Discord team is aware of the issue as well.</p>

<h2>Is Discord going to disappear tomorrow?</h2>

<p>Probably not tomorrow. They have 14 people <a href="https://discordapp.com/company">full time</a>, and they’ve raised money from some of the best investors in Silicon Valley, including <a href="http://www.benchmark.com/">Benchmark</a> and <a href="http://www.accel.com/companies/">Accel</a>.</p>

<p>By focusing on gaming communities, Discord has differentiated itself from the many other communication apps. Discord is well received and has a rapidly growing user base.  They plan to keep their basic offerings free for unlimited users and hope to make money with premium offerings (themes, add-ons, content, and more).</p>

<h2>Join us!</h2>

<p>More than 500 of us have already migrated to the new Reactiflux.  Join us, we&#39;re one click away: <a href="http://join.reactiflux.com/">http://join.reactiflux.com</a></p>

<p><em>Note: Jordan Hawker’s thorough <a href="http://jhawk.co/team-chat-comparison">research</a> made our decision a lot easier.</em></p>

</div>



      </div>
    
      <div class="post-list-item">
        

<h1>

  <a href="/blog/2015/10/07/react-v0.14.html">React v0.14</a>

</h1>

<p class="meta">
  October  7, 2015
  by
  
    
      <a href="http://benalpert.com">Ben Alpert</a>
    
    
  
</p>

<hr>

<div class="post">
  <p>We’re happy to announce the release of React 0.14 today! This release has a few major changes, primarily designed to simplify the code you write every day and to better support environments like React Native.</p>

<p>If you tried the release candidate, thank you – your support is invaluable and we&#39;ve fixed a few bugs that you reported.</p>

<p>As with all of our releases, we consider this version to be stable enough to use in production and recommend that you upgrade in order to take advantage of our latest improvements.</p>

<h2>Upgrade Guide</h2>

<p>Like always, we have a few breaking changes in this release. We know changes can be painful (the Facebook codebase has over 15,000 React components), so we always try to make changes gradually in order to minimize the pain.</p>

<p>If your code is free of warnings when running under React 0.13, upgrading should be easy. We have two new small breaking changes that didn&#39;t give a warning in 0.13 (see below). Every new change in 0.14, including the major changes below, is introduced with a runtime warning and will work as before until 0.15, so you don&#39;t have to worry about your app breaking with this upgrade.</p>

<p>For the two major changes which require significant code changes, we&#39;ve included <a href="https://github.com/reactjs/react-codemod/blob/master/README.md">codemod scripts</a> to help you upgrade your code automatically.</p>

<p>See the changelog below for more details.</p>

<h2>Installation</h2>

<p>We recommend using React from <code>npm</code> and using a tool like browserify or webpack to build your code into a single bundle. To install the two packages:</p>

<ul>
<li><code>npm install --save react react-dom</code></li>
</ul>

<p>Remember that by default, React runs extra checks and provides helpful warnings in development mode. When deploying your app, set the <code>NODE_ENV</code> environment variable to <code>production</code> to use the production build of React which does not include the development warnings and runs significantly faster.</p>

<p>If you can’t use <code>npm</code> yet, we provide pre-built browser builds for your convenience, which are also available in the <code>react</code> package on bower.</p>

<ul>
<li><strong>React</strong><br>
Dev build with warnings: <a href="https://fb.me/react-0.14.0.js">https://fb.me/react-0.14.0.js</a><br>
Minified build for production: <a href="https://fb.me/react-0.14.0.min.js">https://fb.me/react-0.14.0.min.js</a><br></li>
<li><strong>React with Add-Ons</strong><br>
Dev build with warnings: <a href="https://fb.me/react-with-addons-0.14.0.js">https://fb.me/react-with-addons-0.14.0.js</a><br>
Minified build for production: <a href="https://fb.me/react-with-addons-0.14.0.min.js">https://fb.me/react-with-addons-0.14.0.min.js</a><br></li>
<li><strong>React DOM</strong> (include React in the page before React DOM)<br>
Dev build with warnings: <a href="https://fb.me/react-dom-0.14.0.js">https://fb.me/react-dom-0.14.0.js</a><br>
Minified build for production: <a href="https://fb.me/react-dom-0.14.0.min.js">https://fb.me/react-dom-0.14.0.min.js</a><br></li>
</ul>

<h2>Changelog</h2>

<h3>Major changes</h3>

<ul>
<li><h4>Two Packages: React and React DOM</h4>

<p>As we look at packages like <a href="https://github.com/facebook/react-native">react-native</a>, <a href="https://github.com/reactjs/react-art">react-art</a>, <a href="https://github.com/Flipboard/react-canvas">react-canvas</a>, and <a href="https://github.com/Izzimach/react-three">react-three</a>, it has become clear that the beauty and essence of React has nothing to do with browsers or the DOM.</p>

<p>To make this more clear and to make it easier to build more environments that React can render to, we’re splitting the main <code>react</code> package into two: <code>react</code> and <code>react-dom</code>. <strong>This paves the way to writing components that can be shared between the web version of React and React Native.</strong> We don’t expect all the code in an app to be shared, but we want to be able to share the components that do behave the same across platforms.</p>

<p>The <code>react</code> package contains <code>React.createElement</code>, <code>.createClass</code>, <code>.Component</code>, <code>.PropTypes</code>, <code>.Children</code>, and the other helpers related to elements and component classes. We think of these as the <a href="http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/"><em>isomorphic</em></a> or <a href="https://medium.com/@mjackson/universal-javascript-4761051b7ae9"><em>universal</em></a> helpers that you need to build components.</p>

<p>The <code>react-dom</code> package has <code>ReactDOM.render</code>, <code>.unmountComponentAtNode</code>, and <code>.findDOMNode</code>. In <code>react-dom/server</code> we have server-side rendering support with <code>ReactDOMServer.renderToString</code> and <code>.renderToStaticMarkup</code>.</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">var</span> <span class="nx">React</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;react&#39;</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">ReactDOM</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;react-dom&#39;</span><span class="p">);</span>

<span class="kd">var</span> <span class="nx">MyComponent</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
  <span class="nx">render</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">return</span> <span class="o">&lt;</span><span class="nx">div</span><span class="o">&gt;</span><span class="nx">Hello</span> <span class="nx">World</span><span class="o">&lt;</span><span class="err">/div&gt;;</span>
  <span class="p">}</span>
<span class="p">});</span>

<span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="o">&lt;</span><span class="nx">MyComponent</span> <span class="o">/&gt;</span><span class="p">,</span> <span class="nx">node</span><span class="p">);</span>
</code></pre></div>
<p>The old names will continue to work with a warning until 0.15 is released, and we’ve published the <a href="https://github.com/reactjs/react-codemod/blob/master/README.md">automated codemod script</a> we used at Facebook to help you with this transition.</p>

<p>The add-ons have moved to separate packages as well:</p>

<ul>
<li><code>react-addons-clone-with-props</code></li>
<li><code>react-addons-create-fragment</code></li>
<li><code>react-addons-css-transition-group</code></li>
<li><code>react-addons-linked-state-mixin</code></li>
<li><code>react-addons-perf</code></li>
<li><code>react-addons-pure-render-mixin</code></li>
<li><code>react-addons-shallow-compare</code></li>
<li><code>react-addons-test-utils</code></li>
<li><code>react-addons-transition-group</code></li>
<li><code>react-addons-update</code></li>
<li><code>ReactDOM.unstable_batchedUpdates</code> in <code>react-dom</code>.</li>
</ul>

<p>For now, please use matching versions of <code>react</code> and <code>react-dom</code> (and the add-ons, if you use them) in your apps to avoid versioning problems.</p></li>
<li><h4>DOM node refs</h4>

<p>The other big change we’re making in this release is exposing refs to DOM components as the DOM node itself. That means: we looked at what you can do with a <code>ref</code> to a React DOM component and realized that the only useful thing you can do with it is call <code>this.refs.giraffe.getDOMNode()</code> to get the underlying DOM node. Starting with this release, <code>this.refs.giraffe</code> <em>is</em> the actual DOM node. <strong>Note that refs to custom (user-defined) components work exactly as before; only the built-in DOM components are affected by this change.</strong></p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">var</span> <span class="nx">Zoo</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createClass</span><span class="p">({</span>
  <span class="nx">render</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">return</span> <span class="o">&lt;</span><span class="nx">div</span><span class="o">&gt;</span><span class="nx">Giraffe</span> <span class="nx">name</span><span class="o">:</span> <span class="o">&lt;</span><span class="nx">input</span> <span class="nx">ref</span><span class="o">=</span><span class="s2">&quot;giraffe&quot;</span> <span class="o">/&gt;&lt;</span><span class="err">/div&gt;;</span>
  <span class="p">},</span>
  <span class="nx">showName</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="c1">// Previously: var input = this.refs.giraffe.getDOMNode();</span>
    <span class="kd">var</span> <span class="nx">input</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">refs</span><span class="p">.</span><span class="nx">giraffe</span><span class="p">;</span>
    <span class="nx">alert</span><span class="p">(</span><span class="nx">input</span><span class="p">.</span><span class="nx">value</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">});</span>
</code></pre></div>
<p>This change also applies to the return result of <code>ReactDOM.render</code> when passing a DOM node as the top component. As with refs, this change does not affect custom components.</p>

<p>With this change, we’re deprecating <code>.getDOMNode()</code> and replacing it with <code>ReactDOM.findDOMNode</code> (see below). If your components are currently using <code>.getDOMNode()</code>, they will continue to work with a warning until 0.15.</p></li>
<li><h4>Stateless functional components</h4>

<p>In idiomatic React code, most of the components you write will be stateless, simply composing other components. We’re introducing a new, simpler syntax for these components where you can take <code>props</code> as an argument and return the element you want to render:</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="c1">// A functional component using an ES2015 (ES6) arrow function:</span>
<span class="kd">var</span> <span class="nx">Aquarium</span> <span class="o">=</span> <span class="p">(</span><span class="nx">props</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
  <span class="kd">var</span> <span class="nx">fish</span> <span class="o">=</span> <span class="nx">getFish</span><span class="p">(</span><span class="nx">props</span><span class="p">.</span><span class="nx">species</span><span class="p">);</span>
  <span class="k">return</span> <span class="o">&lt;</span><span class="nx">Tank</span><span class="o">&gt;</span><span class="p">{</span><span class="nx">fish</span><span class="p">}</span><span class="o">&lt;</span><span class="err">/Tank&gt;;</span>
<span class="p">};</span>

<span class="c1">// Or with destructuring and an implicit return, simply:</span>
<span class="kd">var</span> <span class="nx">Aquarium</span> <span class="o">=</span> <span class="p">({</span><span class="nx">species</span><span class="p">})</span> <span class="o">=&gt;</span> <span class="p">(</span>
  <span class="o">&lt;</span><span class="nx">Tank</span><span class="o">&gt;</span>
    <span class="p">{</span><span class="nx">getFish</span><span class="p">(</span><span class="nx">species</span><span class="p">)}</span>
  <span class="o">&lt;</span><span class="err">/Tank&gt;</span>
<span class="p">);</span>

<span class="c1">// Then use: &lt;Aquarium species=&quot;rainbowfish&quot; /&gt;</span>
</code></pre></div>
<p>These components behave just like a React class with only a <code>render</code> method defined. Since no component instance is created for a functional component, any <code>ref</code> added to one will evaluate to <code>null</code>. Functional components do not have lifecycle methods, but you can set <code>.propTypes</code> and <code>.defaultProps</code> as properties on the function.</p>

<p>This pattern is designed to encourage the creation of these simple components that should comprise large portions of your apps. In the future, we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations.</p></li>
<li><h4>Deprecation of react-tools</h4>

<p>The <code>react-tools</code> package and <code>JSXTransformer.js</code> browser file <a href="/blog/2015/06/12/deprecating-jstransform-and-react-tools.html">have been deprecated</a>. You can continue using version <code>0.13.3</code> of both, but we no longer support them and recommend migrating to <a href="http://babeljs.io/">Babel</a>, which has built-in support for React and JSX.</p></li>
<li><h4>Compiler optimizations</h4>

<p>React now supports two compiler optimizations that can be enabled in Babel 5.8.24 and newer. Both of these transforms <strong>should be enabled only in production</strong> (e.g., just before minifying your code) because although they improve runtime performance, they make warning messages more cryptic and skip important checks that happen in development mode, including propTypes.</p>

<p><strong>Inlining React elements:</strong> The <code>optimisation.react.inlineElements</code> transform converts JSX elements to object literals like <code>{type: &#39;div&#39;, props: ...}</code> instead of calls to <code>React.createElement</code>.</p>

<p><strong>Constant hoisting for React elements:</strong> The <code>optimisation.react.constantElements</code> transform hoists element creation to the top level for subtrees that are fully static, which reduces calls to <code>React.createElement</code> and the resulting allocations. More importantly, it tells React that the subtree hasn’t changed so React can completely skip it when reconciling.</p></li>
</ul>

<h3>Breaking changes</h3>

<p>In almost all cases, we change our APIs gradually and warn for at least one release to give you time to clean up your code. These two breaking changes did not have a warning in 0.13 but should be easy to find and clean up:</p>

<ul>
<li><code>React.initializeTouchEvents</code> is no longer necessary and has been removed completely. Touch events now work automatically.</li>
<li>Add-Ons: Due to the DOM node refs change mentioned above, <code>TestUtils.findAllInRenderedTree</code> and related helpers are no longer able to take a DOM component, only a custom component.</li>
</ul>

<p>These three breaking changes had a warning in 0.13, so you shouldn’t have to do anything if your code is already free of warnings:</p>

<ul>
<li>The <code>props</code> object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, <a href="/docs/top-level-api.html#react.cloneelement"><code>React.cloneElement</code></a> should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.</li>
<li>Plain objects are no longer supported as React children; arrays should be used instead. You can use the <a href="/docs/create-fragment.html"><code>createFragment</code></a> helper to migrate, which now returns an array.</li>
<li>Add-Ons: <code>classSet</code> has been removed. Use <a href="https://github.com/JedWatson/classnames">classnames</a> instead.</li>
</ul>

<h3>New deprecations, introduced with a warning</h3>

<p>Each of these changes will continue to work as before with a new warning until the release of 0.15 so you can upgrade your code gradually.</p>

<ul>
<li><p>Due to the DOM node refs change mentioned above, <code>this.getDOMNode()</code> is now deprecated and <code>ReactDOM.findDOMNode(this)</code> can be used instead. Note that in most cases, calling <code>findDOMNode</code> is now unnecessary – see the example above in the “DOM node refs” section.</p>

<p>With each returned DOM node, we&#39;ve added a <code>getDOMNode</code> method for backwards compatibility that will work with a warning until 0.15. If you have a large codebase, you can use our <a href="https://github.com/reactjs/react-codemod/blob/master/README.md">automated codemod script</a> to change your code automatically.</p></li>
<li><p><code>setProps</code> and <code>replaceProps</code> are now deprecated. Instead, call ReactDOM.render again at the top level with the new props.</p></li>
<li><p>ES6 component classes must now extend <code>React.Component</code> in order to enable stateless function components. The <a href="/blog/2015/01/27/react-v0.13.0-beta-1.html#other-languages">ES3 module pattern</a> will continue to work.</p></li>
<li><p>Reusing and mutating a <code>style</code> object between renders has been deprecated. This mirrors our change to freeze the <code>props</code> object.</p></li>
<li><p>Add-Ons: <code>cloneWithProps</code> is now deprecated. Use <a href="/docs/top-level-api.html#react.cloneelement"><code>React.cloneElement</code></a> instead (unlike <code>cloneWithProps</code>, <code>cloneElement</code> does not merge <code>className</code> or <code>style</code> automatically; you can merge them manually if needed).</p></li>
<li><p>Add-Ons: To improve reliability, <code>CSSTransitionGroup</code> will no longer listen to transition events. Instead, you should specify transition durations manually using props such as <code>transitionEnterTimeout={500}</code>.</p></li>
</ul>

<h3>Notable enhancements</h3>

<ul>
<li>Added <code>React.Children.toArray</code> which takes a nested children object and returns a flat array with keys assigned to each child. This helper makes it easier to manipulate collections of children in your <code>render</code> methods, especially if you want to reorder or slice <code>this.props.children</code> before passing it down. In addition, <code>React.Children.map</code> now returns plain arrays too.</li>
<li>React uses <code>console.error</code> instead of <code>console.warn</code> for warnings so that browsers show a full stack trace in the console. (Our warnings appear when you use patterns that will break in future releases and for code that is likely to behave unexpectedly, so we do consider our warnings to be “must-fix” errors.)</li>
<li>Previously, including untrusted objects as React children <a href="http://danlec.com/blog/xss-via-a-spoofed-react-element">could result in an XSS security vulnerability</a>. This problem should be avoided by properly validating input at the application layer and by never passing untrusted objects around your application code. As an additional layer of protection, <a href="https://github.com/facebook/react/pull/4832">React now tags elements</a> with a specific <a href="http://www.2ality.com/2014/12/es6-symbols.html">ES2015 (ES6) <code>Symbol</code></a> in browsers that support it, in order to ensure that React never considers untrusted JSON to be a valid element. If this extra security protection is important to you, you should add a <code>Symbol</code> polyfill for older browsers, such as the one included by <a href="http://babeljs.io/docs/usage/polyfill/">Babel’s polyfill</a>.</li>
<li>When possible, React DOM now generates XHTML-compatible markup.</li>
<li>React DOM now supports these standard HTML attributes: <code>capture</code>, <code>challenge</code>, <code>inputMode</code>, <code>is</code>, <code>keyParams</code>, <code>keyType</code>, <code>minLength</code>, <code>summary</code>, <code>wrap</code>. It also now supports these non-standard attributes: <code>autoSave</code>, <code>results</code>, <code>security</code>.</li>
<li>React DOM now supports these SVG attributes, which render into namespaced attributes: <code>xlinkActuate</code>, <code>xlinkArcrole</code>, <code>xlinkHref</code>, <code>xlinkRole</code>, <code>xlinkShow</code>, <code>xlinkTitle</code>, <code>xlinkType</code>, <code>xmlBase</code>, <code>xmlLang</code>, <code>xmlSpace</code>.</li>
<li>The <code>image</code> SVG tag is now supported by React DOM.</li>
<li>In React DOM, arbitrary attributes are supported on custom elements (those with a hyphen in the tag name or an <code>is=&quot;...&quot;</code> attribute).</li>
<li>React DOM now supports these media events on <code>audio</code> and <code>video</code> tags: <code>onAbort</code>, <code>onCanPlay</code>, <code>onCanPlayThrough</code>, <code>onDurationChange</code>, <code>onEmptied</code>, <code>onEncrypted</code>, <code>onEnded</code>, <code>onError</code>, <code>onLoadedData</code>, <code>onLoadedMetadata</code>, <code>onLoadStart</code>, <code>onPause</code>, <code>onPlay</code>, <code>onPlaying</code>, <code>onProgress</code>, <code>onRateChange</code>, <code>onSeeked</code>, <code>onSeeking</code>, <code>onStalled</code>, <code>onSuspend</code>, <code>onTimeUpdate</code>, <code>onVolumeChange</code>, <code>onWaiting</code>.</li>
<li>Many small performance improvements have been made.</li>
<li>Many warnings show more context than before.</li>
<li>Add-Ons: A <a href="https://github.com/facebook/react/pull/3355"><code>shallowCompare</code></a> add-on has been added as a migration path for <code>PureRenderMixin</code> in ES6 classes.</li>
<li>Add-Ons: <code>CSSTransitionGroup</code> can now use <a href="https://github.com/facebook/react/blob/48942b85/docs/docs/10.1-animation.md#custom-classes">custom class names</a> instead of appending <code>-enter-active</code> or similar to the transition name.</li>
</ul>

<h3>New helpful warnings</h3>

<ul>
<li>React DOM now warns you when nesting HTML elements invalidly, which helps you avoid surprising errors during updates.</li>
<li>Passing <code>document.body</code> directly as the container to <code>ReactDOM.render</code> now gives a warning as doing so can cause problems with browser extensions that modify the DOM.</li>
<li>Using multiple instances of React together is not supported, so we now warn when we detect this case to help you avoid running into the resulting problems.</li>
</ul>

<h3>Notable bug fixes</h3>

<ul>
<li>Click events are handled by React DOM more reliably in mobile browsers, particularly in Mobile Safari.</li>
<li>SVG elements are created with the correct namespace in more cases.</li>
<li>React DOM now renders <code>&lt;option&gt;</code> elements with multiple text children properly and renders <code>&lt;select&gt;</code> elements on the server with the correct option selected.</li>
<li>When two separate copies of React add nodes to the same document (including when a browser extension uses React), React DOM tries harder not to throw exceptions during event handling.</li>
<li>Using non-lowercase HTML tag names in React DOM (e.g., <code>React.createElement(&#39;DIV&#39;)</code>) no longer causes problems, though we continue to recommend lowercase for consistency with the JSX tag name convention (lowercase names refer to built-in components, capitalized names refer to custom components).</li>
<li>React DOM understands that these CSS properties are unitless and does not append “px” to their values: <code>animationIterationCount</code>, <code>boxOrdinalGroup</code>, <code>flexOrder</code>, <code>tabSize</code>, <code>stopOpacity</code>.</li>
<li>Add-Ons: When using the test utils, <code>Simulate.mouseEnter</code> and <code>Simulate.mouseLeave</code> now work.</li>
<li>Add-Ons: ReactTransitionGroup now correctly handles multiple nodes being removed simultaneously.</li>
</ul>

</div>



      </div>
    
      <div class="post-list-item">
        

<h1>

  <a href="/blog/2015/10/01/react-render-and-top-level-api.html">ReactDOM.render and the Top Level React API</a>

</h1>

<p class="meta">
  October  1, 2015
  by
  
    
      <a href="http://www.jimsproch.com">Jim Sproch</a>
    
     and 
  
    
      <a href="https://twitter.com/sebmarkbage">Sebastian Markbåge</a>
    
    
  
</p>

<hr>

<div class="post">
  <p>When you&#39;re in React&#39;s world you are just building components that fit into other components. Everything is a component. Unfortunately not everything around you is built using React. At the root of your tree you still have to write some plumbing code to connect the outer world into React.</p>

<p>The primary API for rendering into the DOM looks like this:</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="nx">reactElement</span><span class="p">,</span> <span class="nx">domContainerNode</span><span class="p">)</span>
</code></pre></div>
<p>To update the properties of an existing component, you call render again with a new element.</p>

<p>If you are rendering React components within a single-page app, you may need to plug into the app&#39;s view lifecycle to ensure your app will invoke unmountComponentAtNode at the appropriate time. React will not automatically clean up a tree. You need to manually call:</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">unmountComponentAtNode</span><span class="p">(</span><span class="nx">domContainerNode</span><span class="p">)</span>
</code></pre></div>
<p>This is important and often forgotten. Forgetting to call <code>unmountComponentAtNode</code> will cause your app to leak memory. There is no way for us to automatically detect when it is appropriate to do this work. Every system is different.</p>

<p>It is not unique to the DOM. If you want to insert a React Native view in the middle of an existing iOS app you will hit similar issues.</p>

<h2>Helpers</h2>

<p>If you have multiple React roots, or a single root that gets deleted over time, we recommend that you always create your own wrapper API. These will all look slightly different depending on what your outer system looks like. For example, at Facebook we have a system that automatically ties into our page transition router to automatically call <code>unmountComponentAtNode</code>.</p>

<p>Rather than calling <code>ReactDOM.render()</code> directly everywhere, consider writing/using a library that will manage mounting and unmounting within your application.</p>

<p>In your environment you may want to always configure internationalization, routers, user data etc. If you have many different React roots it can be a pain to set up configuration nodes all over the place. By creating your own wrapper you can unify that configuration into one place.</p>

<h2>Object Oriented Updates</h2>

<p>If you call <code>ReactDOM.render</code> a second time to update properties, all your props are completely replaced.</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="o">&lt;</span><span class="nx">App</span> <span class="nx">locale</span><span class="o">=</span><span class="s2">&quot;en-US&quot;</span> <span class="nx">userID</span><span class="o">=</span><span class="p">{</span><span class="mi">1</span><span class="p">}</span> <span class="o">/&gt;</span><span class="p">,</span> <span class="nx">container</span><span class="p">);</span>
<span class="c1">// props.userID == 1</span>
<span class="c1">// props.locale == &quot;en-US&quot;</span>
<span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="o">&lt;</span><span class="nx">App</span> <span class="nx">userID</span><span class="o">=</span><span class="p">{</span><span class="mi">2</span><span class="p">}</span> <span class="o">/&gt;</span><span class="p">,</span> <span class="nx">container</span><span class="p">);</span>
<span class="c1">// props.userID == 2</span>
<span class="c1">// props.locale == undefined ??!?</span>
</code></pre></div>
<p>In object-oriented programming, all state lives on each object instance and you apply changes incrementally by mutating that state, one piece at a time. If you are using React within an app that expects an object oriented API (for instance, if you are building a custom web component using React), it might be surprising/confusing to a user that setting a single property would wipe out all the other properties on your component.</p>

<p>We used to have a helper function called <code>setProps</code> which allowed you to update only a few properties at a time. Unfortunately this API lived on a component instance, required React to keep this state internally and wasn&#39;t very natural anyway. Therefore, we&#39;re deprecating it and suggest that you build it into your own wrapper instead.</p>

<p>Here&#39;s some boilerplate to get you started. It is a 0.14 migration path for codebases using <code>setProps</code> and <code>replaceProps</code>.</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kr">class</span> <span class="nx">ReactComponentRenderer</span> <span class="p">{</span>
  <span class="nx">constructor</span><span class="p">(</span><span class="nx">klass</span><span class="p">,</span> <span class="nx">container</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">klass</span> <span class="o">=</span> <span class="nx">klass</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">container</span> <span class="o">=</span> <span class="nx">container</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">props</span> <span class="o">=</span> <span class="p">{};</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">component</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="nx">replaceProps</span><span class="p">(</span><span class="nx">props</span><span class="p">,</span> <span class="nx">callback</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">props</span> <span class="o">=</span> <span class="p">{};</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">setProps</span><span class="p">(</span><span class="nx">props</span><span class="p">,</span> <span class="nx">callback</span><span class="p">);</span>
  <span class="p">}</span>

  <span class="nx">setProps</span><span class="p">(</span><span class="nx">partialProps</span><span class="p">,</span> <span class="nx">callback</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">klass</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nx">warn</span><span class="p">(</span>
        <span class="s1">&#39;setProps(...): Can only update a mounted or &#39;</span> <span class="o">+</span>
        <span class="s1">&#39;mounting component. This usually means you called setProps() on &#39;</span> <span class="o">+</span>
        <span class="s1">&#39;an unmounted component. This is a no-op.&#39;</span>
      <span class="p">);</span>
      <span class="k">return</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">,</span> <span class="nx">partialProps</span><span class="p">);</span>
    <span class="kd">var</span> <span class="nx">element</span> <span class="o">=</span> <span class="nx">React</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">klass</span><span class="p">,</span> <span class="k">this</span><span class="p">.</span><span class="nx">props</span><span class="p">);</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">component</span> <span class="o">=</span> <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="nx">element</span><span class="p">,</span> <span class="k">this</span><span class="p">.</span><span class="nx">container</span><span class="p">,</span> <span class="nx">callback</span><span class="p">);</span>
  <span class="p">}</span>

  <span class="nx">unmount</span><span class="p">()</span> <span class="p">{</span>
    <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">unmountComponentAtNode</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">container</span><span class="p">);</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">klass</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>Object-oriented APIs don&#39;t look like that though. They use setters and methods. I think we can do better. If you know more about the component API that you&#39;re rendering, you can create a more natural object-oriented API around your React component.</p>
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kr">class</span> <span class="nx">ReactVideoPlayer</span> <span class="p">{</span>
  <span class="nx">constructor</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="nx">container</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_container</span> <span class="o">=</span> <span class="nx">container</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_url</span> <span class="o">=</span> <span class="nx">url</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_isPlaying</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_render</span><span class="p">();</span>
  <span class="p">}</span>

  <span class="nx">_render</span><span class="p">()</span> <span class="p">{</span>
    <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span>
      <span class="o">&lt;</span><span class="nx">VideoPlayer</span> <span class="nx">url</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">_url</span><span class="p">}</span> <span class="nx">playing</span><span class="o">=</span><span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">_isPlaying</span><span class="p">}</span> <span class="o">/&gt;</span><span class="p">,</span>
      <span class="k">this</span><span class="p">.</span><span class="nx">_container</span>
    <span class="p">);</span>
  <span class="p">}</span>

  <span class="nx">get</span> <span class="nx">url</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">_url</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="nx">set</span> <span class="nx">url</span><span class="p">(</span><span class="nx">value</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_url</span> <span class="o">=</span> <span class="nx">value</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_render</span><span class="p">();</span>
  <span class="p">}</span>

  <span class="nx">play</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_isPlaying</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_render</span><span class="p">();</span>
  <span class="p">}</span>

  <span class="nx">pause</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_isPlaying</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">_render</span><span class="p">();</span>
  <span class="p">}</span>

  <span class="nx">destroy</span><span class="p">()</span> <span class="p">{</span>
    <span class="nx">ReactDOM</span><span class="p">.</span><span class="nx">unmountComponentAtNode</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_container</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>This example shows how to provide an imperative API on top of a declarative one. Similarly, the reverse can be done, and a declarative wrapper can be used when exposing a Web Component as a React component.</p>

</div>



      </div>
    
      <div class="post-list-item">
        

<h1>

  <a href="/blog/2015/09/14/community-roundup-27.html">Community Round-up #27 &ndash; Relay Edition</a>

</h1>

<p class="meta">
  September 14, 2015
  by
  
    
      <a href="https://twitter.com/steveluscher">Steven Luscher</a>
    
    
  
</p>

<hr>

<div class="post">
  <p>In the weeks following the <a href="/blog/2015/08/11/relay-technical-preview.html">open-source release</a> of the Relay technical preview, the community has been abuzz with activity. We are honored to have been able to enjoy a steady stream of ideas and contributions from such a talented group of individuals. Let&#39;s take a look at some of the things we&#39;ve achieved, together!</p>

<h2>Teaching servers to speak GraphQL</h2>

<p>Every great Relay app starts by finding a GraphQL server to talk to. The community has spent the past few weeks teaching GraphQL to a few backend systems.</p>

<p>Bryan Goldstein (<a href="https://github.com/brysgo">brysgo</a>) has built a tool to help you define a GraphQL schema that wraps a set of <a href="http://bookshelfjs.org/">Bookshelf.JS</a> models. Check out <a href="https://github.com/brysgo/graphql-bookshelf">graphql-bookshelf</a>.</p>

<p>RisingStack (<a href="https://github.com/risingstack">risingstack</a>) created a GraphQL ORM called <a href="https://github.com/RisingStack/graffiti">graffiti</a> that you can plug into <a href="http://mongoosejs.com/">mongoose</a> and serve using Express, Hapi, or Koa.</p>

<p>David Mongeau-Petitpas (<a href="https://github.com/dmongeau">dmongeau</a>) is working on a way to vend your Laravel models through a GraphQL endpoint, <a href="https://github.com/Folkloreatelier/laravel-graphql">laravel-graphql</a>.</p>

<p>Gerald Monaco (<a href="https://github.com/devknoll">devknoll</a>) created <a href="https://github.com/devknoll/graphql-schema">graphql-schema</a> to allow the creation of JavaScript GraphQL schemas using a fluent/chainable interface.</p>

<p>Jason Dusek (<a href="https://github.com/solidsnack">solidsnack</a>) dove deep into PostgreSQL to teach it how to respond to GraphQL query strings as though they were SQL queries. Check out <a href="https://github.com/solidsnack/GraphpostgresQL">GraphpostgresQL</a>.</p>

<p>Espen Hovlandsdal (<a href="https://github.com/rexxars">rexxars</a>) built a <a href="https://github.com/vaffel/sql-to-graphql">sql-to-graphql</a> tool that can perform introspection on the tables of a MySQL or PostgreSQL database, and produce a queryable HTTP GraphQL endpoint out of it.</p>

<p>Mick Hansen (<a href="https://github.com/mickhansen">mickhansen</a>) offers a set of <a href="https://github.com/mickhansen/graphql-sequelize">schema-building helpers</a> for use with the <a href="http://docs.sequelizejs.com/en/latest/">Sequelize ORM</a> for MySQL, PostgreSQL, SQLite, and MSSQL.</p>

<h2>GraphQL beyond JavaScript</h2>

<p>Robert Mosolgo (<a href="https://github.com/rmosolgo">rmosolgo</a>) brought the full set of schema-building and query execution tools to Ruby, in the form of <a href="https://github.com/rmosolgo/graphql-ruby">graphql-ruby</a> and <a href="https://github.com/rmosolgo/graphql-relay-ruby">graphql-relay-ruby</a>. Check out his <a href="https://github.com/rmosolgo/graphql-ruby-demo">Rails-based demo</a>.</p>

<p>Andreas Marek (<a href="https://github.com/andimarek">andimarek</a>) has brewed up a Java implementation of GraphQL, <a href="https://github.com/andimarek/graphql-java">graphql-java</a>.</p>

<p><a href="https://github.com/vladar">vladar</a> is hard at work on a PHP port of the GraphQL reference implementation, <a href="https://github.com/webonyx/graphql-php">graphql-php</a>.</p>

<p>Taeho Kim (<a href="https://github.com/dittos">dittos</a>) is bringing GraphQL to Python, with <a href="https://github.com/dittos/graphql-py">graphql-py</a>.</p>

<p>Oleg Ilyenko (<a href="https://github.com/OlegIlyenko">OlegIlyenko</a>) made a beautiful and <a href="http://sangria-graphql.org/">delicious-looking website</a> for a Scala implementation of GraphQL, <a href="https://github.com/sangria-graphql/sangria">sangria</a>.</p>

<p>Joe McBride (<a href="https://github.com/joemcbride">joemcbride</a>) has an up-and-running example of GraphQL for .NET, <a href="https://github.com/joemcbride/graphql-dotnet">graphql-dotnet</a>.</p>

<h2>Show me, don&#39;t tell me</h2>

<p>Interact with this <a href="http://sgwilym.github.io/relay-visual-learners/">visual tour of Relay&#39;s architecture</a> by Sam Gwilym (<a href="https://github.com/sgwilym">sgwilym</a>).</p>

<p><a href="http://sgwilym.github.io/relay-visual-learners/">
  <img src="/img/blog/relay-visual-architecture-tour.png" alt="Relay for visual learners" style="max-width:100%">
</a></p>

<p>Sam has already launched a product that leverages Relay&#39;s data-fetching, optimistic responses, pagination, and mutations &ndash; all atop a Ruby GraphQL server: <a href="http://new.comique.co/">new.comique.co</a></p>

<h2>Prototyping in the browser</h2>

<p>I (<a href="https://github.com/steveluscher">steveluscher</a>) whipped up <a href="https://facebook.github.io/relay/prototyping/playground.html">a prototyping tool</a> that you can use to hack on a schema and a React/Relay app, from the comfort of your browser. Thanks to Jimmy Jia (<a href="https://github.com/taion">taion</a>) for supplying the local-only network layer, <a href="https://github.com/relay-tools/relay-local-schema">relay-local-schema</a>.</p>

<h2>Skeletons in the closet</h2>

<p>Joseph Rollins (<a href="https://github.com/fortruce">fortruce</a>) created a hot-reloading, auto schema-regenerating, <a href="https://github.com/fortruce/relay-skeleton">Relay skeleton</a> that you can use to get up and running quickly.</p>

<p>Michael Hart (<a href="https://mhart">mhart</a>) built a <a href="https://github.com/mhart/simple-relay-starter">simple-relay-starter</a> kit using Browserify.</p>

<h2>Routing around</h2>

<p>Jimmy Jia (<a href="https://github.com/taion">taion</a>) and Gerald Monaco (<a href="https://github.com/devknoll">devknoll</a>) have been helping lost URLs find their way to Relay apps through their work on <a href="https://github.com/relay-tools/react-router-relay">react-router-relay</a>. Check out Christoph Pojer&#39;s (<a href="https://github.com/cpojer">cpojer</a>) <a href="https://medium.com/@cpojer/relay-and-routing-36b5439bad9">blog post</a> on the topic. Jimmy completed the Relay TodoMVC example with routing, which you can check out at <a href="https://github.com/taion/relay-todomvc">taion/relay-todomvc</a>.</p>

<p>Chen Hung-Tu (<a href="https://github.com/transedward">transedward</a>) built a chat app atop the above mentioned router, with threaded conversations and pagination. Check it out at <a href="https://github.com/transedward/relay-chat">transedward/relay-chat</a>.</p>

<h2>In your words</h2>

<div class="skinny-row">
  <div class="skinny-col">
    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Relay making good on its promise to be the &quot;React.js of data fetching&quot;. Rebuilding small app with it. Spectacular how fast/easy building is.</p>&mdash; Kyle Mathews (@kylemathews) <a href="https://twitter.com/kylemathews/status/640289107122368513">September 5, 2015</a></blockquote>

    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/RainySundayHackathon?src=hash">#RainySundayHackathon</a> exploring <a href="https://twitter.com/hashtag/GraphQL?src=hash">#GraphQL</a> <a href="https://twitter.com/hashtag/RelayJS?src=hash">#RelayJS</a> <a href="http://t.co/Mm3HlqMejJ">pic.twitter.com/Mm3HlqMejJ</a></p>&mdash; Bastian Kistner (@passionkind) <a href="https://twitter.com/passionkind/status/632846601447411712">August 16, 2015</a></blockquote>

    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Friday. Time to GraphQL a MySQL database. <a href="https://twitter.com/hashtag/graphql?src=hash">#graphql</a> <a href="https://twitter.com/hashtag/relayjs?src=hash">#relayjs</a> <a href="https://twitter.com/hashtag/reactjs?src=hash">#reactjs</a> <a href="https://twitter.com/hashtag/webapp?src=hash">#webapp</a></p>&mdash; xador (@xadorfr) <a href="https://twitter.com/xadorfr/status/632108552765751296">August 14, 2015</a></blockquote>
  </div>
  <div class="skinny-col">
    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Started a new <a href="https://twitter.com/hashtag/RelayJS?src=hash">#RelayJS</a> and <a href="https://twitter.com/hashtag/GraphQL?src=hash">#GraphQL</a> meet up group! <a href="http://t.co/Vt6Cv4nNH4">http://t.co/Vt6Cv4nNH4</a> If you&#39;re in the Bay Area, I&#39;d love to have you join! <a href="https://twitter.com/hashtag/ReactJS?src=hash">#ReactJS</a></p>&mdash; Gerald Monaco (@devknoll) <a href="https://twitter.com/devknoll/status/636723716123000832">August 27, 2015</a></blockquote>

    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">.<a href="https://twitter.com/reactjs">@reactjs</a> <a href="https://twitter.com/laneykuenzel">@laneykuenzel</a> <a href="https://twitter.com/BhuwanKhattar">@BhuwanKhattar</a> these <a href="https://twitter.com/hashtag/relayjs?src=hash">#relayjs</a> mutations. they&#39;re mind-blowingly awesome. they make so much damn sense. thank you!</p>&mdash; Jimmy Jia (@jimmy_jia) <a href="https://twitter.com/jimmy_jia/status/634204563709526016">August 20, 2015</a></blockquote>

    <blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">REST is dead, long live REST! <a href="https://twitter.com/hashtag/graphql?src=hash">#graphql</a> <a href="https://twitter.com/hashtag/relayjs?src=hash">#relayjs</a></p>&mdash; Syrus Akbary (@syrusakbary) <a href="https://twitter.com/syrusakbary/status/631531666113060864">August 12, 2015</a></blockquote>
  </div>
</div>

</div>



      </div>
    

    <div class="pagination">
      
        <a href="/blog/page4/" class="previous">
          &laquo; Previous Page
        </a>
      
      
        <a href="/blog/page6/" class="next">
          Next Page &raquo;
        </a>
      
    </div>
  </div>
</section>


    <footer class="nav-footer">
  <section class="sitemap">
    <a href="/" class="nav-home">
    </a>
    <div>
      <h5><a href="/docs/">Docs</a></h5>
      <a href="/docs/hello-world.html">Quick Start</a>
      <a href="/docs/thinking-in-react.html">Thinking in React</a>
      <a href="/tutorial/tutorial.html">Tutorial</a>
      <a href="/docs/jsx-in-depth.html">Advanced Guides</a>
    </div>
    <div>
      <h5><a href="/community/support.html">Community</a></h5>
      <a href="http://stackoverflow.com/questions/tagged/reactjs" target="_blank">Stack Overflow</a>
      <a href="https://discuss.reactjs.org/" target="_blank">Discussion Forum</a>
      <a href="https://discord.gg/0ZcbPKXt5bZjGY5n" target="_blank">Reactiflux Chat</a>
      <a href="https://www.facebook.com/react" target="_blank">Facebook</a>
      <a href="https://twitter.com/reactjs" target="_blank">Twitter</a>
    </div>
    <div>
      <h5><a href="/community/support.html">Resources</a></h5>
      <a href="/community/conferences.html">Conferences</a>
      <a href="/community/videos.html">Videos</a>
      <a href="https://github.com/facebook/react/wiki/Examples" target="_blank">Examples</a>
      <a href="https://github.com/facebook/react/wiki/Complementary-Tools" target="_blank">Complementary Tools</a>
    </div>
    <div>
      <h5>More</h5>
      <a href="/blog/">Blog</a>
      <a href="https://github.com/facebook/react" target="_blank">GitHub</a>
      <a href="http://facebook.github.io/react-native/" target="_blank">React Native</a>
      <a href="/acknowledgements.html">Acknowledgements</a>
    </div>
  </section>
  <a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource">
    <img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/>
  </a>
  <section class="copyright">
    Copyright © 2017 Facebook Inc.
  </section>
</footer>

  </div>

  <div id="fb-root"></div>
  <script src="/js/anchor-links.js"></script>
  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-41298772-1', 'facebook.github.io');
    ga('send', 'pageview');

    !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

    (function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId=623268441017527";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));

    docsearch({
      apiKey: '36221914cce388c46d0420343e0bb32e',
      indexName: 'react',
      inputSelector: '#algolia-doc-search'
    });
  </script>
</body>
</html>
